<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<style type="text/css">
	


</style>
<body>
	<h1>aaaaaaaaaaaaaa</h1>
	<h1>aaaaaaaaaaaaaa</h1>
	<h1>aaaaaaaaaaaaaa</h1>
	<h1>aaaaaaaaaaaaaa</h1>
	<h1>aaaaaaaaaaaaaa</h1>
	<h1>aaaaaaaaaaaaaa</h1>
	<h1>aaaaaaaaaaaaaa</h1>


</body>
<script type="text/javascript">
objs=document.getElementsByTagName('h1');
for(i=0;i<objs.length;i++){
	objs[i].onmouseenter=function(){
		this.style.background='red';
	}
	objs[i].onmouseleave=function(){
		this.style.background='#fff';
	}
}
</script>
</html>